<script setup lang="ts">
import { useRouter } from 'vue-router';
const router = useRouter();

interface NavItem {
  id: string;
  label: string;
  href: string;
}

const navList = [
  {
    id: 'demo',
    label: '开发者日历',
    href: '/clander',
  },
  // {
  //   id: 'sub-demo',
  //   label: 'Sub Demo',
  //   href: '/zh/clander-detail',
  // },
];

const navClick = (item: NavItem) => {
  router.push(item.href);
};
</script>
<template>
  <div class="app-header">
    <div class="head-content">
      <a class="logo" target="_blank" href="https://www.mindspore.cn/"><img alt="MindSpore logo" src="../assets/logo.png" /></a>
      <!-- <div class="nav-list">
        <div v-for="item in navList" :key="item.id" class="nav-item" @click="navClick(item)">
          {{ item.label }}
        </div>
      </div> -->
    </div>
  </div>
</template>
<style lang="scss">
.app-header {
  position: fixed;
  display: flex;
  justify-items: flex-start;
  align-items: center;
  padding: 8px 24px;
  width: 100%;
  height: 60px;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba($color: #000000, $alpha: 0.1);
  .head-content {
    margin: 0 auto;
    display: flex;
    justify-content: flex-start;
    max-width: 1416px;
    width: 100%;
    align-items: center;
  }
}
.logo {
  display: inline-block;
  width: 116px;
  @media screen and (max-width: 1416px) {
    width: 100px;
  }
  img {
    width: 100%;
  }
}
.nav-list {
  display: flex;
  width: 100%;
  padding: 0 48px;
  .nav-item {
    margin: 0 24px;
    cursor: pointer;
    &:hover {
      color: #002ea7;
    }
  }
}
</style>
